'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  router.get('/user', controller.user.find);
  router.put('/user', controller.user.set);
  router.post('/user', controller.user.add);
  router.del('/user', controller.user.del);
  router.post('/test', controller.test.add);
  router.get('/test', controller.test.find);
  router.put('/test', controller.test.set);
  router.delete('/test', controller.test.del);
  router.get('/es', controller.es.find);
  router.post('/es', controller.es.add);
  router.put('/es', controller.es.set);
  router.delete('/es', controller.es.del);
  router.get('/esAgg', controller.es.aggsFind);
};
